#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: mysql01_type.py 
@version:
@time: 2022/01/18 
"""
from TapClientCaseData.ColumnGenerateData.dynamic.base.base01_mysql import *

__all__ = ['generate_columns_data', 'PK',
           'MYSQL_ALL_TYPE',
           'MYSQL_ALL_TYPE57',
           'MYSQL_DATE_TIME57',
           'MYSQL_TIMESTAMP57',
           'MYSQL_TIME57',
           'MYSQL_ALL_TYPE_COLUMNS',
           'MYSQL_ALL_TYPE_COLUMNS57',
           'MYSQL_STRING_ALL_COLUMNS',
           'MYSQL_NUMERIC_ALL_COLUMNS',
           'MYSQL_DATE_TIME_ALL_COLUMNS',
           'MYSQL_DATE_TIME_ALL_COLUMNS57',
           # 'MYSQL_SPATIAL_DATA_ALL_COLUMNS', 地理位置占不支持
           'MYSQL_JSON_ALL_COLUMNS',
           ]

# STRING_ALL_TYPE
MYSQL_STRING_ALL_TYPE = [
    PK, CHAR, VARCHAR, BINARY, VARBINARY,
    TINYBLOB, TINYTEXT,
    BLOB, TEXT,
    MEDIUMBLOB, MEDIUMTEXT,
    LONGBLOB, LONGTEXT,
    ENUM, SET
]

# NUMERIC ALL TYPE
MYSQL_NUMERIC_ALL_TYPE = [
    PK, BIT, TINYINT, TINYINT_UNSIGNED, BOOL,
    BOOLEAN, SMALLINT, SMALLINT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED,
    INT, INT_UNSIGNED, BIGINT, BIGINT_UNSIGNED, DECIMAL,
    DECIMAL_UNSIGNED, FLOAT, FLOAT_UNSIGNED, DOUBLE, DOUBLE_UNSIGNED
]

# DATE/TIME ALL TYPE
MYSQL_DATE_TIME_ALL_TYPE = [
    PK, DATE, DATETIME, TIMESTAMP, TIME, YEAR,
    # YEAR2
]
MYSQL_DATE_TIME_ALL_TYPE57 = [
    PK, DATE, DATETIME57, TIMESTAMP57, TIME57, YEAR
]

MYSQL_DATE_TIME57 = [
    PK, DATETIME57
]

MYSQL_TIMESTAMP57 = [
    PK, TIMESTAMP57
]
MYSQL_TIME57 = [
    PK, TIME57
]

# SPATIAL ALL TYPE
MYSQL_SPATIAL_DATA_ALL_TYPE = [
    PK, GEOMETRY, POINT, LINESTRING, POLYGON,
    MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION
]
# JSON
MYSQL_JSON_ALL_TYPE = [
    PK, JSON
]
# ALL COLUMNS
MYSQL_ALL_TYPE = [PK] + MYSQL_STRING_ALL_TYPE[1:] + \
                 MYSQL_NUMERIC_ALL_TYPE[1:] + \
                 MYSQL_DATE_TIME_ALL_TYPE[1:] + \
                 MYSQL_SPATIAL_DATA_ALL_TYPE[1:] + \
                 MYSQL_JSON_ALL_TYPE[1:]
MYSQL_ALL_TYPE57 = [PK] + MYSQL_STRING_ALL_TYPE[1:] + \
                   MYSQL_NUMERIC_ALL_TYPE[1:] + \
                   MYSQL_DATE_TIME_ALL_TYPE57[1:] + \
                   MYSQL_SPATIAL_DATA_ALL_TYPE[1:] + \
                   MYSQL_JSON_ALL_TYPE[1:]
# CATEGORY COLUMNS
MYSQL_ALL_TYPE_COLUMNS = generate_columns_data(MYSQL_ALL_TYPE)
MYSQL_ALL_TYPE_COLUMNS57 = generate_columns_data(MYSQL_ALL_TYPE57)
MYSQL_STRING_ALL_COLUMNS = generate_columns_data(MYSQL_STRING_ALL_TYPE)
MYSQL_NUMERIC_ALL_COLUMNS = generate_columns_data(MYSQL_NUMERIC_ALL_TYPE)
MYSQL_DATE_TIME_ALL_COLUMNS = generate_columns_data(MYSQL_DATE_TIME_ALL_TYPE)
MYSQL_DATE_TIME_ALL_COLUMNS57 = generate_columns_data(MYSQL_DATE_TIME_ALL_TYPE57)
MYSQL_SPATIAL_DATA_ALL_COLUMNS = generate_columns_data(MYSQL_SPATIAL_DATA_ALL_TYPE)
MYSQL_JSON_ALL_COLUMNS = generate_columns_data(MYSQL_JSON_ALL_TYPE)
